package cn.micai.base.io;

import java.io.File;

/**
 * 描述：How to get current working directory in java
 * <p>
 *
 * @author: 赵新国
 * @date: 2018/6/7 14:39
 */
public class getCurretWorkingDirectoryMain {

    public static void main(String [] args) {

        System.out.println("--------------------");

        String currentWorkingDirectory;
        currentWorkingDirectory = System.getProperty("user.dir");
        System.out.println("Current working directory is : " + currentWorkingDirectory);

        /*String currentWorkingDirectory = "";
        File file = new File(".");
        currentWorkingDirectory = file.getAbsolutePath();
        System.out.println("Current working directory is : " + currentWorkingDirectory);*/

        System.out.println("--------------------");
    }
}
